﻿
using Idte.Application.Core;
using Idte.Common.Process;
using Idte.Core.Infrastructure.Repository;
using System.Collections.Generic;
//using eConsulting.Application.Core.Repository;


namespace Driver
{
    [Aggregate]
    public class A : ProcessDescriptor<IStepDescriptor>
    {
        public override Step Create()
        {
            return null;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            //MenuConfiguration menuConfig = ConfigurationManager.GetSection("MenuSection") as MenuConfiguration;
            //foreach (MenuConfig menu in menuConfig.Menus)
            //{
            //    Console.WriteLine("Menu {0}", menu.Name);
            //    foreach (MenuItemConfig item in menu.Items)
            //    {
            //        Console.WriteLine("Item {0}", item.Name);
            //    }
            //}

            //ApplicationServiceBase service = new eConsulting.Application.Core.ApplicationServiceBase();
            //IApplicationModel model = service.GetModel();
            ARepository repo = new ARepository();
            //ProcessDescriptor template = new ProcessDescriptor() { Code = "CS", Name = "ProjectTemplate" };
            ////repo.Insert(template.ToStore<ProjectTemplate, ProjectTemplateStore>());

            //DriverContext.Instance.Steps.Add(new A() { Name = "Test" });
            //DriverContext.Instance.SaveChanges();

            repo.Insert(new A() { Name = "Test" });
            repo.Submit();
            //IMenu menu = model.Menu["admin"];
            //foreach (IMenuItem item in menu.Items)
            //{
            //    Console.WriteLine("Item {0}", item.Title);
            //    foreach (IMenuItem subItem in item.Items)
            //    {
            //        Console.WriteLine("Item {0}", subItem.Title);
            //    }
            //}
        }
    }
}
